#!/usr/bin/env python
#
import os
from google.appengine.ext import db
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
from models import Videoactive


class Activate(webapp.RequestHandler):
	def get(self, data=None):
  		videos = db.GqlQuery("SELECT * FROM Videoactive LIMIT 1")
  		result = videos.get()
		result.active = "1"
		result.put()
		self.response.out.write("Updated")

		
 

application = webapp.WSGIApplication([('/activate', Activate)], debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()

